<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <!--文本输入框-->
        <input type="text" v-model="text"> <br>
        <!--文本域-->
        <textarea v-model="message" placeholder="add multiple lines"></textarea> <br>

        <!--单个复选框-->
        <input type="checkbox" id="checkbox" v-model="checked">
        <label for="checkbox">{{ checked }}</label> <br>
        <!--多个复选框-->
        <div id='example-3'>
            <input type="checkbox" id="jack" value="Jack" v-model="checkedNames">
            <label for="jack">Jack</label>
            <input type="checkbox" id="john" value="John" v-model="checkedNames">
            <label for="john">John</label>
            <input type="checkbox" id="mike" value="Mike" v-model="checkedNames">
            <label for="mike">Mike</label>
            <br>
            <span>Checked names: {{ checkedNames }}</span>
        </div>
        <br>

        <!--单选按钮-->
        <div id="example-4">
            <input type="radio" id="one" value="One" v-model="picked">
            <label for="one">One</label>
            <br>
            <input type="radio" id="two" value="Two" v-model="picked">
            <label for="two">Two</label>
            <br>
            <span>Picked: {{ picked }}</span>
        </div>

        <!--下拉列表 单选-->
        <div id="example-5">
            <select v-model="selected">
                <option value="">请选择</option>
                <option value="optionA">A</option>
                <option value="optionB">B</option>
                <option value="optionC">C</option>
            </select>
            <span>Selected: {{ selected }}</span>
        </div>
        <!--下拉列表 多选-->
        <div id="example-6">
            <select v-model="selectes" multiple style="width: 50px;">
                <option value="">请选择</option>
                <option value="optionA">A</option>
                <option value="optionB">B</option>
                <option value="optionC">C</option>
            </select>
            <br>
            <span>Selected: {{ selectes }}</span>
        </div>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>

    Vue.config.productionTip = false;

    new Vue({
        el:"#app",
        data(){
            return {
                text:"", //文本输入框
                message:"",//文本域
                checked:true,//单个复选框
                checkedNames:[],//多个复选框
                picked:"One",//单选按钮
                selected:"optionB",//下拉列表 单选
                selectes: [ "", "optionA", "optionB", "optionC" ]//下拉列表 多选
            }
        }
    })
</script>
</html>